// wx.ready(function () {
//   wx.onMenuShareAppMessage({
//     title: dataForWx.title,
//     desc: dataForWx.desc,
//     link: dataForWx.link,
//     imgUrl: dataForWx.imgUrl,
//     fail: function (res) {
//       alert(JSON.stringify(res));
//     }
//   });

//   wx.onMenuShareTimeline({
//     title: dataForWx.title,
//     link: dataForWx.link,
//     imgUrl: dataForWx.imgUrl,
//     fail: function (res) {
//       alert(JSON.stringify(res));
//     }
//   });
// });

export default function (title, desc, logo) {
  wx.ready(function () {
    wx.onMenuShareAppMessage({
      title,
      desc,
      link: window.location.href,
      imgUrl: 'http://evp.51job.com/51job/api/51miniadmin/' + logo,
      fail: function (res) {
        alert(JSON.stringify(res));
      }
    });

    wx.onMenuShareTimeline({
      title,
      link: window.location.href,
      imgUrl: 'http://evp.51job.com/51job/api/51miniadmin/' + logo,
      fail: function (res) {
        alert(JSON.stringify(res));
      }
    });
  });
}